using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._RasterProcessing
{
    /// <summary>
    /// <para>Clip Raster</para>
    /// <para>Cuts out a portion of a raster dataset, mosaic dataset, or image service layer.</para>
    /// <para>剪切栅格数据集、镶嵌数据集或影像服务图层的一部分。</para>
    /// </summary>    
    [DisplayName("Clip Raster")]
    public class Clip : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Clip()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The raster dataset, mosaic dataset, or image service to be clipped.</para>
        /// <para>要裁剪的栅格数据集、镶嵌数据集或影像服务。</para>
        /// </param>
        /// <param name="_rectangle">
        /// <para>Rectangle</para>
        /// <para><xdoc>
        ///   <para>The four coordinates that define the extent of the bounding box used to clip the raster.</para>
        ///   <para>If the clip extent specified is not aligned with the input raster dataset, the clip tool verifies that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.</para>
        ///   <para>Use the Clear button to reset the rectangle extent to the extent of the input raster dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义用于裁剪栅格的边界框范围的四个坐标。</para>
        ///   <para>如果指定的裁剪范围未与输入栅格数据集对齐，则裁剪工具将验证是否使用了正确的对齐方式。这可能会导致输出的范围与工具中指定的范围略有不同。</para>
        ///   <para>使用清除按钮将矩形范围重置为输入栅格数据集的范围。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster Dataset</para>
        /// <para><xdoc>
        ///   <para>The name, location, and format of the dataset being created. Make sure that it can support the necessary bit depth.</para>
        ///   <para>When storing the raster dataset in a file format, you need to specify the file extension:</para>
        ///   <bulletList>
        ///     <bullet_item>.bil—Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip—Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS IMAGINE</bullet_item><para/>
        ///     <bullet_item>.jpg—JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2—JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf—MRF</bullet_item><para/>
        ///     <bullet_item>.crf—CRF</bullet_item><para/>
        ///     <bullet_item>No extension for Esri Grid</bullet_item><para/>
        ///   </bulletList>
        ///   <para>When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset.</para>
        ///   <para>When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the geoprocessing Environments.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的数据集的名称、位置和格式。确保它可以支持必要的位深度。</para>
        ///   <para>以文件格式存储栅格数据集时，需要指定文件扩展名：</para>
        ///   <bulletList>
        ///     <bullet_item>.bil - Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip - Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS 想象</bullet_item><para/>
        ///     <bullet_item>.jpg - JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2 - JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf - MRF</bullet_item><para/>
        ///     <bullet_item>.crf - CRF</bullet_item><para/>
        ///     <bullet_item>没有 Esri Grid 的扩展模块</bullet_item><para/>
        ///   </bulletList>
        ///   <para>在地理数据库中存储栅格数据集时，请勿在栅格数据集的名称中添加文件扩展名。</para>
        ///   <para>将栅格数据集存储为 JPEG 文件、JPEG 2000 文件、TIFF 文件或地理数据库时，可以在地理处理环境中指定压缩类型和压缩质量。</para>
        /// </xdoc></para>
        /// </param>
        public Clip(object _in_raster, object _rectangle, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._rectangle = _rectangle;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Clip Raster";

        public override string CallName => "management.Clip";

        public override List<string> AcceptEnvironments => ["compression", "configKeyword", "extent", "geographicTransformations", "nodata", "outputCoordinateSystem", "parallelProcessingFactor", "pyramid", "rasterStatistics", "resamplingMethod", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _rectangle, _out_raster, _in_template_dataset, _nodata_value, _clipping_geometry.GetGPValue(), _maintain_clipping_extent.GetGPValue()];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The raster dataset, mosaic dataset, or image service to be clipped.</para>
        /// <para>要裁剪的栅格数据集、镶嵌数据集或影像服务。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Rectangle</para>
        /// <para><xdoc>
        ///   <para>The four coordinates that define the extent of the bounding box used to clip the raster.</para>
        ///   <para>If the clip extent specified is not aligned with the input raster dataset, the clip tool verifies that the proper alignment is used. This may cause the output to have a slightly different extent than specified in the tool.</para>
        ///   <para>Use the Clear button to reset the rectangle extent to the extent of the input raster dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义用于裁剪栅格的边界框范围的四个坐标。</para>
        ///   <para>如果指定的裁剪范围未与输入栅格数据集对齐，则裁剪工具将验证是否使用了正确的对齐方式。这可能会导致输出的范围与工具中指定的范围略有不同。</para>
        ///   <para>使用清除按钮将矩形范围重置为输入栅格数据集的范围。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rectangle")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _rectangle { get; set; }


        /// <summary>
        /// <para>Output Raster Dataset</para>
        /// <para><xdoc>
        ///   <para>The name, location, and format of the dataset being created. Make sure that it can support the necessary bit depth.</para>
        ///   <para>When storing the raster dataset in a file format, you need to specify the file extension:</para>
        ///   <bulletList>
        ///     <bullet_item>.bil—Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip—Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS IMAGINE</bullet_item><para/>
        ///     <bullet_item>.jpg—JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2—JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf—MRF</bullet_item><para/>
        ///     <bullet_item>.crf—CRF</bullet_item><para/>
        ///     <bullet_item>No extension for Esri Grid</bullet_item><para/>
        ///   </bulletList>
        ///   <para>When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset.</para>
        ///   <para>When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the geoprocessing Environments.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的数据集的名称、位置和格式。确保它可以支持必要的位深度。</para>
        ///   <para>以文件格式存储栅格数据集时，需要指定文件扩展名：</para>
        ///   <bulletList>
        ///     <bullet_item>.bil - Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip - Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS 想象</bullet_item><para/>
        ///     <bullet_item>.jpg - JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2 - JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf - MRF</bullet_item><para/>
        ///     <bullet_item>.crf - CRF</bullet_item><para/>
        ///     <bullet_item>没有 Esri Grid 的扩展模块</bullet_item><para/>
        ///   </bulletList>
        ///   <para>在地理数据库中存储栅格数据集时，请勿在栅格数据集的名称中添加文件扩展名。</para>
        ///   <para>将栅格数据集存储为 JPEG 文件、JPEG 2000 文件、TIFF 文件或地理数据库时，可以在地理处理环境中指定压缩类型和压缩质量。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Output Extent</para>
        /// <para><xdoc>
        ///   <para>A raster dataset or feature class to use as the extent. The clip output includes any pixels that intersect the minimum bounding rectangle.</para>
        ///   <para>If a feature class is used as the output extent and you want to clip the raster based on the polygon features, check the Use Input Features for Clipping Geometry parameter. When this parameter is checked, the pixel depth of the output may be promoted. Therefore, make sure that the output format can support the proper pixel depth.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要用作范围的栅格数据集或要素类。剪辑输出包括与最小边界矩形相交的任何像素。</para>
        ///   <para>如果将要素类用作输出范围，并且您希望根据面要素裁剪栅格，请选中使用输入要素裁剪几何参数。选中此参数后，输出的像素深度可能会被提升。因此，请确保输出格式可以支持适当的像素深度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_template_dataset { get; set; } = null;


        /// <summary>
        /// <para>NoData Value</para>
        /// <para>The value for pixels to be considered as NoData.</para>
        /// <para>要被视为 NoData 的像素值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("NoData Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _nodata_value { get; set; } = null;


        /// <summary>
        /// <para>Use Input Features for Clipping Geometry</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the data will be clipped to the minimum bounding rectangle or to the geometry of the feature class.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The minimum bounding rectangle is used to clip the data.  </bullet_item><para/>
        ///     <bullet_item>Checked—The geometry of the selected feature class is used to clip the data. The pixel depth of the output may be increased; therefore, make sure that the output format can support the proper pixel depth.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是将数据裁剪到最小边界矩形还是要素类的几何。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 最小边界矩形用于裁剪数据。</bullet_item><para/>
        ///     <bullet_item>选中 - 所选要素类的几何用于裁剪数据。输出的像素深度可以增加;因此，请确保输出格式可以支持适当的像素深度。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Input Features for Clipping Geometry")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _clipping_geometry_value _clipping_geometry { get; set; } = _clipping_geometry_value._false;

        public enum _clipping_geometry_value
        {
            /// <summary>
            /// <para>ClippingGeometry</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ClippingGeometry")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Maintain Clipping Extent</para>
        /// <para><xdoc>
        ///   <para>Specifies the extent to use in the clipping output.
        ///   <bulletList>
        ///     <bullet_item>Checked—The number of columns and rows will be adjusted and the pixels will be resampled to exactly match the clipping extent specified.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The cell alignment of the input raster will be maintained and the output extent will be adjusted accordingly.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定要在剪切输出中使用的范围。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将调整列数和行数，并重新采样像素以完全匹配指定的剪切范围。</bullet_item><para/>
        ///     <bullet_item>未选中—将保持输入栅格的像元对齐方式，并相应地调整输出范围。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maintain Clipping Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _maintain_clipping_extent_value _maintain_clipping_extent { get; set; } = _maintain_clipping_extent_value._false;

        public enum _maintain_clipping_extent_value
        {
            /// <summary>
            /// <para>MAINTAIN_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MAINTAIN_EXTENT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_MAINTAIN_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_MAINTAIN_EXTENT")]
            [GPEnumValue("false")]
            _false,

        }

        public Clip SetEnv(object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object nodata = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null, object resamplingMethod = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, nodata: nodata, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics, resamplingMethod: resamplingMethod, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}